package net.kesumu.yushabu.storage;

import android.provider.BaseColumns;

public class YushabuMessageContract {
    
    public static final int STATE_UNREADED = 0,
                            STATE_READED = 1;

    public YushabuMessageContract() {
    }

    public static final String TEXT_TYPE = " TEXT";
    public static final String COMMA_SEP = ",";
    public static final String SQL_CREATE_ENTRY_YUSHABUMESSAGE =
        "CREATE TABLE " + YushabuMessageEntry.TABLE_NAME + " (" +
        YushabuMessageEntry._ID + " INTEGER PRIMARY KEY," +
        YushabuMessageEntry.COLUMN_NAME_MESSAGEID + TEXT_TYPE + COMMA_SEP +
        YushabuMessageEntry.COLUMN_NAME_CONTENT + TEXT_TYPE + COMMA_SEP +
        YushabuMessageEntry.COLUMN_NAME_SENDTIME + TEXT_TYPE + COMMA_SEP +
        YushabuMessageEntry.COLUMN_NAME_STATE + TEXT_TYPE + COMMA_SEP + 
        YushabuMessageEntry.COLUMN_NAME_USERID + TEXT_TYPE + COMMA_SEP + 
        YushabuMessageEntry.COLUMN_NAME_SESSIONID + TEXT_TYPE + COMMA_SEP + 
        YushabuMessageEntry.COLUMN_NAME_FRIENDUSERID + TEXT_TYPE + 
        " )";

    public static final String SQL_DELETE_ENTRY_YUSHABUMESSAGE =
        "DROP TABLE IF EXISTS " + YushabuMessageEntry.TABLE_NAME;

    public static abstract class YushabuMessageEntry implements BaseColumns {
        public static final String TABLE_NAME = "yushabumessage";
        public static final String COLUMN_NAME_MESSAGEID = "messageId";
        public static final String COLUMN_NAME_CONTENT = "content";
        public static final String COLUMN_NAME_SENDTIME = "sendTime";
        public static final String COLUMN_NAME_STATE = "state";
        public static final String COLUMN_NAME_USERID = "userId";
        public static final String COLUMN_NAME_SESSIONID = "sessionId";
        public static final String COLUMN_NAME_FRIENDUSERID = "friendUserId";
    }
    
}
